package com.qf.mapper;

import com.qf.vo.DtsBrandVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BrandGoodsMapper {
    @Select("SELECT DISTINCT b.*,g.category_id as categoryIds " +
            "FROM dts_brand  b " +
            "LEFT JOIN dts_goods  g " +
            "ON b.id=g.brand_id " +
            "LEFT JOIN dts_category  c " +
            "ON c.id=g.category_id " +
            "WHERE c.deleted is NOT TRUE " +
            "group by c.`name`,c.id")
    List<DtsBrandVo> listBrand();
}
